import { defHttp, jsonHttp } from '@/utils/http/axios';
import { RolePageListGetResultModel, RoleListGetResultModel } from '../demo/model/systemModel';
import { BasicListResult, BasicDataResult } from '../model/baseModel';

enum Api {
  productList = '/hl/heng/dkn/product/productList',
  productSave = '/hl/heng/dkn/product/productSave',
  productRemove = '/hl/heng/dkn/product/productRemove',
  importDknProduct = '/hl/heng/dkn/product/importDknProduct',
  forecastProductList='/hl/heng/dkn/product/forecastProductList',
  forecastProductRemove='/hl/heng/dkn/product/forecastProductRemove',
  importForecastProduct='/hl/heng/dkn/product/importForecastProduct',

  orderList = '/hl/heng/dkn/product/orderList',
  orderStatus = '/hl/heng/dkn/product/orderStatus',
  orderRemove = '/hl/heng/dkn/product/orderRemove',
  orderCancel = '/hl/heng/dkn/product/orderCancel',
  orderEdit = '/hl/heng/dkn/product/orderEditItem',
  orderEditRemove = '/hl/heng/dkn/product/orderEditRemove',
  orderEditAdd = '/hl/heng/dkn/product/orderEditAdd',
  itemNoMapping = '/hl/heng/dkn/product/itemNoMapping',
  orderItemList = '/hl/heng/dkn/product/orderItemList',
  orderDetail='/hl/heng/dkn/product/orderDetail',
  forecastList='/hl/heng/dkn/product/forecastList',
  autoForecastCache2='/hl/heng/dkn/product/autoForecastCache2',
  saveForecastData='/hl/heng/dkn/product/saveForecastData',
  cleanForecastData='/hl/heng/dkn/product/cleanForecastData',

  queryDknTableList='/hl/heng/dkn/product/queryDknTableList',
  addDknClosePlan= '/hl/heng/dkn/product/addDknClosePlan',
  removeDknClosePlan= '/hl/heng/dkn/product/removeDknClosePlan',
  productionPlanAdd='/hl/heng/dkn/product/productionPlanAdd',

  getMainPlan= '/hl/heng/dkn/product/getMainPlan',
  removeMainPlan= '/hl/heng/dkn/product/removeMainPlan',

  notInOrderTable='/hl/heng/dkn/product/notInOrderTable',

  getDateRangeItems='/hl/heng/dkn/product/getDateRangeItems',

  mainPlanList='/hl/heng/dkn/product/mainPlanList',

  yiTiaoZhengList='/hl/heng/dkn/product/yiTiaoZhengList',

  submitPlanData='/hl/heng/dkn/product/submitPlanData',

  createOrderTemple='/hl/excel/createOrderTemple',

}
export const productList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.productList, params });

export const productSave = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.productSave, params });

export const productRemove = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.productRemove, params });
export const importDknProduct = (params?: any) =>
  jsonHttp.post<RolePageListGetResultModel[]>({ url: Api.importDknProduct, params });
export const orderList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderList, params });
export const orderStatus = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderStatus, params });
export const orderRemove = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderRemove, params });

export const orderCancel = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderCancel, params });

export const orderEdit = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderEdit, params });

export const itemNoMapping = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.itemNoMapping, params });

export const orderItemList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderItemList, params });

export const orderEditRemove = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderEditRemove, params });

export const orderEditAdd = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderEditAdd, params });
export const orderDetail = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.orderDetail, params });

export const forecastList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.forecastList, params });

export const autoForecastCache2 = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.autoForecastCache2, params });


export const forecastProductList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.forecastProductList, params });
export const forecastProductRemove = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.forecastProductRemove, params });

export const importForecastProduct = (params?: any) =>
  jsonHttp.post<RolePageListGetResultModel[]>({ url: Api.importForecastProduct, params });


export const queryDknTableList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.queryDknTableList, params });

export const addDknClosePlan = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.addDknClosePlan, params });

export const removeDknClosePlan = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.removeDknClosePlan, params });


export const productionPlanAdd = (params?: any) =>
  jsonHttp.post<RolePageListGetResultModel[]>({ url: Api.productionPlanAdd, params });

export const getMainPlan = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.getMainPlan, params });

export const removeMainPlan = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.removeMainPlan, params });


export const notInOrderTable = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.notInOrderTable, params });

export const getDateRangeItems = (params?: any) =>
  jsonHttp.post<RolePageListGetResultModel[]>({ url: Api.getDateRangeItems, params });

export const mainPlanList = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.mainPlanList, params });

export const yiTiaoZhengList = (params?: any) =>
  jsonHttp.post<RolePageListGetResultModel[]>({ url: Api.yiTiaoZhengList, params });


export const submitPlanData = (params?: any) =>
  jsonHttp.post<RolePageListGetResultModel[]>({ url: Api.submitPlanData, params });


export const createOrderTemple = (params?: any) =>
  jsonHttp.post<any>({ url: Api.createOrderTemple, params });

export const saveForecastData = (params?: any) =>
  jsonHttp.post<any>({ url: Api.saveForecastData, params });

export const cleanForecastData = (params?: any) =>
  defHttp.post<RolePageListGetResultModel[]>({ url: Api.cleanForecastData, params });

